home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
038a
/
bas_int1.zip
/
DAYMONYR.BAS
< prev
next >
Wrap
BASIC Source File
|
1991-05-27
|
1KB
|
34 lines
'===================================================================
' Quick Basic Forum
' Date : 28-Apr-91
' From : Dick Dennison
'Subject : Determine Date, Day, Month, Year using
' Call Interrupt
'===================================================================
DECLARE SUB asmdate ()
'$INCLUDE: 'qb.bi'
DIM SHARED InRegs AS RegTypeX, outregs AS RegTypeX
asmdate
SUB asmdate
'Works for days after 01/01/80.
'Interrupt 21 Function 2AH - get date
DIM day(7) AS STRING
day$(0) = "Sun": day$(1) = "Mon": day$(2) = "Tue"
day$(3) = "Wed": day$(4) = "Thu"
day$(5) = "Fri": day$(6) = "Sat"
InRegs.ax = (&H2A * 256)
CALL INTERRUPTX(&H21, InRegs, outregs)
' cx is the year, dh is the month, dl is the date, al is the day
'PRINT OutRegs.cx; " = year"
'PRINT OutRegs.dx \ 256; " = month"
'PRINT OutRegs.dx MOD 256; " = date"
'PRINT OutRegs.ax MOD 256; " = day - 0 for Sun, 1 for Mon, etc."
daynum% = outregs.ax MOD 256
PRINT day$(daynum%)
END SUB